﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class dms_VideoState : System.Web.UI.Page
{
    public static string filename = "";
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request.QueryString["fn"] != null)
        {
            filename = Request.QueryString["fn"];
        }
        Literal1.Text = "<link href='"+ KTFrameworkCus.Globals.ApplicationPath+"dms/HTML5Video/video-js.css'"+ "rel='stylesheet' type='text/css' />"+
  "<script src='"+ KTFrameworkCus.Globals.ApplicationPath+"dms/HTML5Video/video.js' type='text/javascript' charset='utf-8'></script>"+
  "<link rel='stylesheet' href='" + KTFrameworkCus.Globals.ApplicationPath + "dms/HTML5Video/video-js.css' type='text/css' media='screen' title='Video JS' />";
    }

    public string getExtension(string filename)
    {
        string fileext = filename.Substring(filename.LastIndexOf('.') + 1).ToUpper();
        if (fileext == "mp4")
        {
            return "video/mp4";
        }
        else if (fileext == "webm")
        {
            return "video/webm";
        }
        else if (fileext == "ogv")
        {
            return "video/ogg";
        }
        else if (fileext == "flv")
        {
            return "video/x-flv";
        }
        else { return "video/mp4"; }
    }
}